package se19team1e.util;

/**
 * 
 * A helper utility class for string operations.
 * 
 * @author lai shiaw san
 *
 */
public class StringUtil {

    /**
     * Checks if a string is null or empty.
     * <p>
     * The string is trimmed of whitespace before validating if it is empty.
     * </p>
     * @param s String to check.
     * @return True if the string is null or empty.
     */
    public static boolean isEmptyOrNull( String s ) {
        if ( s == null ) {
            return true;
        }
        if ( s.trim().length() == 0 ) {
            return true;
        }
        return false;
    }
    
}
